from sqlalchemy import Column, DateTime, Integer, String

from sqlalchemy.orm import declarative_base

from apps.database import engine

Base = declarative_base()
Base.metadata.create_all(engine)


class User(Base):
    __tablename__ = 'user'

    id = Column(Integer, primary_key=True)

    username = Column(String(50), unique=True, nullable=False)

    password = Column(String(200), nullable=False)

    create_time = Column(DateTime, nullable=False)